#ifndef VLCONTROLLER_H
#define VLCONTROLLER_H

#include "qdatetime.h"
#include "cv.h"
#include "highgui.h"

#include "vlmodel.h"
#include "vlview.h"


class VLController
{
public:
    VLController();
    void run();
    void ROI_clear();
    void ROI_add_point(CvPoint point);
    void ROI_apply();

private:
    VLModel* vlModel;
    VLView vlView;

    VideoSource video;
    bool bUsingROI;
    IplImage* mask;
    IplImage* negMask;
    void recomputeMask();
    int countZero;

    void virtualLoop();

};

#endif // VLCONTROLLER_H
